package com.sc.nft.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.dto.ActivityTaskPrizeDTO;
import com.sc.nft.dto.UserActivityTaskDTO;
import com.sc.nft.entity.ActivityTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sc.nft.entity.Order;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.enums.LinkTypeEnums;
import com.sc.nft.enums.task.ActivityTaskTypeEnum;
import com.sc.nft.enums.task.ParticipantsEnum;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zxy
 * @since 2023-09-13
 */
public interface ActivityTaskService {
    /**
     * 创建活动任务
     * @param name
     * @param taskPanelId
     * @param buyCollectionId
     * @param buyCount
     * @param partakeCollectionId
     * @param participants
     * @param collectionRange
     * @param mallRange
     * @param taskPlan
     * @param repeat
     * @param taskPrizeDTOS
     * @param sort
     */
    void addTask(String name, Long taskPanelId, Long buyCollectionId, Integer buyCount, Long partakeCollectionId, ParticipantsEnum participants, Boolean collectionRange, Boolean mallRange, Integer taskPlan, Boolean repeat, List<ActivityTaskPrizeDTO> taskPrizeDTOS, Integer sort, BigDecimal spendPrice);
    void editTask(Long id,String name, Long taskPanelId, Long buyCollectionId, Integer buyCount, Long partakeCollectionId, ParticipantsEnum participants, Boolean collectionRange, Boolean mallRange, Integer taskPlan, Boolean repeat, List<ActivityTaskPrizeDTO> taskPrizeDTOS, Integer sort, BigDecimal spendPrice);

    Page<ActivityTask> getPage(Page toMp);

    ActivityTask getById(Long id);
    List<ActivityTask> list();

    /**
     * 查询活动任务
     * @param activityId
     * @return
     */
    List<UserActivityTaskDTO> getActivityTask(UserInfo userInfo,Long activityId);

    /**
     * 完成任务
     */
    void finishTask(Long collectionId, Long userId, int count, BigDecimal price, ActivityTaskTypeEnum taskType , LinkTypeEnums linkType,Long linkId,Boolean isMallOrder);
}
